package cate.common.table.activity;

import cate.common.table.ERow;
import cate.common.table.XSSFRowWrap;
import cate.common.table.d.GDActivity;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;

@NoteClass("合服天数活动")
public class MergeDayActivityBaseRow extends ERow implements IActivityOpen{

    @NoteField("活动ID")
    public int activityId;

    @NoteField("功能ID")
    public int funcId;

    @NoteField("活动配置ID")
    public int configId;

    @NoteField("开始天数")
    public int startDay;

    @NoteField("开始时间")
    public String startTimeStr;

    @NoteField("结束天数")
    public int endDay;

    @NoteField("结束时间")
    public String endTimeStr;



    @Override
    public void parse(XSSFRowWrap xrw) {
        super.parse(xrw);
        this.id = xrw.getInteger("ID", 0);
        this.activityId = xrw.getInteger("活动ID",0);
        this.funcId = xrw.getInteger("功能ID", 0);
        this.configId = xrw.getInteger("活动配置ID",0);
        this.startDay = xrw.getInteger("开始天数", 0);
        this.startTimeStr = xrw.getString("开始时间");
        this.endDay = xrw.getInteger("结束天数", 0);
        this.endTimeStr = xrw.getString("结束时间");
    }

    @Override
    public byte getType() {
        return GDActivity.Type.MERGE_DAY;
    }

    @Override
    public int getActivityId() {
        return activityId;
    }

    @Override
    public int getFuncId() {
        return funcId;
    }

    @Override
    public int getConfigId() {
        return configId;
    }
}
